<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>活动添加页面</title>
  <link rel="stylesheet" href="../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../yl/style.css" />
  <link rel="stylesheet" href="../../yl/mobile.css" />
  <link rel="stylesheet" href="../../yl/easyui.css" />
  <link rel="stylesheet" href="../../yl/icon.css" />
</head>

<body>
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">会议记录</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'party_organization_activities', 'form': 'dataForm' ,'primary_key':'Party_Organization_Activity_SerialNumber'})">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">{{dataForm.Activity_Type}}活动信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">活动名称</div>
              </template>
              <el-input disabled ref="personal_information" v-model="dataForm.Activity_Name" class="borderless-input"
                placeholder="请输入活动名称" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">所属党组织</div>
              </template>
              <!-- <el-select @change="changeOrganization" v-model="dataForm.Party_Organization_SerialNumber"
                placeholder="请选择所属党组织" size="large">
                <el-option v-for="item in Manager" :key="item.Party_Organization_SerialNumber"
                  :label="item.Party_Organization_Name" :value="item.Party_Organization_SerialNumber" />
              </el-select> -->
              <yl-cascader disabled @change="changeOrganization" v-model="dataForm.Party_Organization_SerialNumber"
                filterable
                :props="{value:'Party_Organization_SerialNumber',label:'Party_Organization_Name',children:'children',checkStrictly: true}"
                placeholder="请选择所属党组织" :options="Manager" style="width: 100%"></yl-cascader>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">活动类型</div>
              </template>
              <el-select disabled v-model="dataForm.Activity_Type" placeholder="请选择活动类型" size="large">
                <el-option v-for="item in activityType" :key="item.value" :label="item.label" :value="item.value" />
              </el-select>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">召开时间</div>
              </template>
              <el-date-picker disabled v-model="dataForm.Activity_Datetime" type="datetime" placeholder="请选择召开日期"
                class="borderless-input" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" size="large" />
            </el-descriptions-item>
            <!-- <el-descriptions-item>
              <template #label>
                <div class="cell-item">结束时间</div>
              </template>
              <el-date-picker disabled v-model="dataForm.Activity_EndDatetime" type="datetime" placeholder="请选择结束时间"
                class="borderless-input" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" size="large" />
            </el-descriptions-item> -->
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">召开地点</div>
              </template>
              <el-input disabled ref="party_organization_activities" v-model="dataForm.Activity_Location"
                class="borderless-input" placeholder="请输入召开地点" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">活动积分</div>
              </template>
              <el-input-number disabled v-model="dataForm.Activity_Points" :min="1" :max="10" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">活动内容</div>
              </template>
              <el-input type="textarea" disabled :rows="5" ref="party_organization_activities"
                v-model="dataForm.Activity_Content" class="borderless-input" placeholder="请输入活动内容" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">记录人</div>
              </template>
              <el-form-item prop="Recorder_SerialNumber"
                :rules="[{ required: true, message: '请选择记录人', trigger: 'change' }]">
                <el-select disabled v-model="dataForm.Recorder_SerialNumber" placeholder="请选择记录人" size="large">
                  <el-option v-for="item in Recorder" :key="item.ID_Card_Number" :label="item.Personal_Name"
                    :value="item.ID_Card_Number" />
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item v-if="type!='1'">
              <template #label>
                <div class="cell-item">召开情况报告</div>
              </template>
              <el-form-item>
                <el-upload class="upload-demo" :drag="true" action="#" :auto-upload="false" :show-file-list="true"
                  :on-change="(file) => handleChange(file, '1')" :on-remove="handleRemove" :file-list="fileList2">
                  <i class="el-icon-upload"></i>
                  <div class="el-upload__text">将文件拖到此处上传，点击<em>提交</em>后保存</div>
                </el-upload>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item v-if="type!='1'">
              <template #label>
                <div class="cell-item">实际结束时间</div>
              </template>
              <el-form-item prop="Activity_EndDatetime"
              :rules="[{ required: true, message: '请选择实际结束时间', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Activity_EndDatetime" type="datetime" placeholder="请选择结束时间"
                class="borderless-input" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item v-if="dataForm.Activity_Type=='民主生活会'&&type!='1'">
              <template #label>
                <div class="cell-item">请示批复</div>
              </template>
              <el-form-item>
                <el-upload class="upload-demo" :drag="true" action="#" :auto-upload="false" :show-file-list="true"
                  :on-change="(file) => handleChange(file, '0')" :on-remove="handleRemove" :file-list="fileList1">
                  <i class="el-icon-upload"></i>
                  <div class="el-upload__text">将文件拖到此处上传，点击<em>提交</em>后保存</div>
                </el-upload>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item v-if="dataForm.Activity_Type=='双联系双报到'&&type!='1'">
              <template #label>
                <div class="cell-item">佐证</div>
              </template>
              <el-form-item>
                <el-upload class="upload-demo" :drag="true" action="#" :auto-upload="false" :show-file-list="true"
                  :on-change="(file) => handleChange(file, '2')" :on-remove="handleRemove" :file-list="fileList3">
                  <i class="el-icon-upload"></i>
                  <div class="el-upload__text">将文件拖到此处上传，点击<em>提交</em>后保存</div>
                </el-upload>
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <div v-if="type=='1'">
          <div class="table_titel">
            <div class="titel">附件汇总</div>
          </div>
          <el-table id="table" border max-height="450" tooltip-effect="dark" :data="party_organization_activities_summary">
            <el-table-column min-width="200" prop="Activity_Summary_SerialNumber" label="附件流水号"></el-table-column>
            <el-table-column min-width="200" align="center" prop="Activity_Summary_Type" label="附件类型">
              <template v-slot="{row}">
                {{row.Activity_Summary_Type =='0'?'请示批复':row.Activity_Summary_Type =='1'?'召开情况报告':'佐证'}}
              </template>
            </el-table-column>
            <el-table-column min-width="200" prop="Activity_Summary_URL" label="附件名称"></el-table-column>
            <el-table-column width="200" fixed="right" align="center" label="操作">
              <template v-slot="{row}">
                <el-button type="primary" size="small" @click="preview(row)">
                  在线预览
                </el-button>
                <el-button type="success" size="small" @click="download(row)">
                  下载附件
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div id="ChildTable">
          <el-descriptions
            :data-options="JSON.stringify({ 'TableName': 'party_organization_activities_summary', 'form': 'party_organization_activities_summary', 'ParentTableName': 'party_organization_activities'})"
            :column="1" size="large" border>
          </el-descriptions>
          <div class="table_titel">
            <div class="titel">参与人员</div>
          </div>
          <el-descriptions
            :data-options="JSON.stringify({ 'TableName': 'party_organization_activities_members', 'form': 'childDataForm', 'ParentTableName': 'party_organization_activities'})"
            :column="1" size="large" border>
          </el-descriptions>
          <el-table max-height="450" tooltip-effect="dark" :data="childDataForm.filter(i=>i.Row_Status != '1')">
            <el-table-column align="center" prop="Personal_Name" label="参与党员姓名">
              <template v-slot="{row}">
                {{Personal_Name(row.ID_Card_Number)}}
              </template>
            </el-table-column>
            <!-- <el-table-column align="center" label="操作" fixed="right">
              <template #default="{row,$index}">
                <el-button size="small" @click="handleRemove(row,$index)">
                  移除
                </el-button>
              </template>
            </el-table-column> -->
          </el-table>
        </div>
      </div>
      <yl-online-preview :file-url="fileUrl" v-model="showDialog"></yl-online-preview>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" v-if="type!='1'" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../yl/vue.js"></script>
<script src="../../config/config.js"></script>
<script src="../../utils/utils.js"></script>
<script src="../../utils/mixins.js"></script>
<script src="../../yl/index.js"></script>
<script src="../../yl/zh-cn.mjs"></script>
<script src="../../yl/index.iife.min.js"></script>
<script src="../../yl/jquery.min.js"></script>
<script src="../../utils/jquery.cookie.js"></script>
<script src="../../yl/jquery.easyui.min.js"></script>
<script src="../../yl/jquery.easyui.mobile.js"></script>
<script src="../../yl/moment.min.js"></script>
<script src="../../api/request.js"></script>
<script src="./js/Add1.js"></script>

</html>